package com.itheima.tanhua.dubbo.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.tanhua.domain.Score;
import org.apache.ibatis.annotations.Select;

/**
 * @author Lff
 * @date 2022/4/8
 */
public interface ScoreMapper extends BaseMapper<Score> {

    @Select("SELECT " +
                "* " +
            "FROM " +
                "tb_score " +
            "WHERE " +
                "uid =#{uid} " +
            "ORDER BY " +
                "checkpoints " +
            "DESC " +
                "limit 0,1")
    Score getMaxCheckPoint(Long uid);
}
